package com.itheima.oopadvanced.singleinstance;

/**
 * @author Anomaly
 * @date 2022/12/12 15:26
 */
public class Test {
    public static void main(String[] args) {
        SingleInstance s1 = SingleInstance.instance;
        SingleInstance s2 = SingleInstance.instance;
        System.out.println("s1 = " + s1);
        System.out.println("s2 = " + s2);
        System.out.println("---------------------------------");
        SingleInstance2 s3 = SingleInstance2.getInstance2();
        SingleInstance2 s4 = SingleInstance2.getInstance2();
        System.out.println("s3 = " + s3);
        System.out.println("s4 = " + s4);
    }


}
